package com.xwsos.exception;

import matrix.module.common.bean.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 周俭
 */
@RestControllerAdvice
public class GlobalControllerCatch {
    @ExceptionHandler(Exception.class)
    public Result exceptionHandler(Exception e) {
        return Result.fail(e.getMessage());
    }
}
